package com.lry.jvm.instructions.loads;

import com.lry.jvm.instructions.base.Index8Instruction;
import com.lry.jvm.rtda.Frame;
import com.lry.jvm.rtda.JObject;

//从局部变量表装载引用类型到栈
public class aload extends Index8Instruction {
    @Override
    public byte getOpCode() {
        return 0x19;
    }

    @Override
    public void execute(Frame frame) throws Exception {
        JObject ref = frame.getLocalVars().getRef(index);
        frame.getOperandStack().pushRef(ref);
    }
}